PhysicsManager = {}

	function PhysicsManager:initialize ( layer )
		
		-- create the MOAIBox2D world object
		self.world = MOAIBox2DWorld.new ()
		-- sets the scale, 1 meter simulation
		-- is equivalent to 38 points world
		-- coords, box2d is best within
		-- 0.1 to 10 meters
		self.world:setUnitsToMeters ( 1/38 )
		
		-- set the gravity
		self.world:setGravity (0, -100)
		
		self.world:start()
		
		if layer then
			layer:setBox2DWorld ( self.world )
		end
		
		-- create a static body, use the method
		-- setTransform to place it
		-- center in the x axis and place at the
		-- bottom of the screen in y axis
		--[==[
		self.floor = {}
		self.floor.body =
			self.world:addBody ( MOAIBox2DBody.STATIC )
		self.floor.body:setTransform( 0, -WORLD_RESOLUTION_Y*0.5)
		
		
		-- define the shape of the object,
		-- called fixture
		-- creates a rect with width equal to screen size
		-- and height equal to 100
		self.floor.fixture = self.floor.body:addRect (
			-WORLD_RESOLUTION_X*0.5, -50,
			WORLD_RESOLUTION_X*0.5, 50 )
		
		-- define friction on floor to none, stop player
		-- from slowing down when running
		self.floor.fixture:setFriction( 0 )
		]==]
		
	
	end


return PhysicsManager